
/*****************************************************************************
 * Copyright (c) 2019, Nations Technologies Inc.
 *
 * All rights reserved.
 * ****************************************************************************
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * - Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the disclaimer below.
 *
 * Nations' name may not be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY NATIONS "AS IS" AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
 * DISCLAIMED. IN NO EVENT SHALL NATIONS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * ****************************************************************************/

/**
 * @file ble_stack_common.h
 * @author Nations Firmware Team
 * @version v1.0.3
 *
 * @copyright Copyright (c) 2019, Nations Technologies Inc. All rights reserved.
 */
#ifndef __BLE_STACK_COMMON_H_
#define __BLE_STACK_COMMON_H_

#include "rwip.h"
#include "global_var.h"
#include "Typedefine.h"
#include "co_bt_defines.h"
#include "prf.h"
#include "rwip_int.h"


#ifdef __cplusplus
extern "C" {
#endif

/* Configer define ------------------------------------------------------------*/
#ifndef _PATCH_LATENCY_
#define _PATCH_LATENCY_         0
#endif
#ifndef _PATCH_ENC_RESPONDSE_
#define _PATCH_ENC_RESPONDSE_   0
#endif

#if ((_PATCH_LATENCY_) || (_PATCH_ENC_RESPONDSE_))
#define _PATCH_LLD_COM_         1
#else
#define _PATCH_LLD_COM_         0
#endif

#ifndef _PATCH_KE_MSG_SET_
#define _PATCH_KE_MSG_SET_   0
#endif
/* Private define ------------------------------------------------------------*/
#define PATCH                   ((PATCH_Module*)(PATCH_BASE+0x14)) 
#define RCC_AHB_PERIPH_PATCH    ((uint32_t)0x00000020)

#define PATCH_REPLACE_ADDR_0           0x00021dd4  //lld_con_start
#define PATCH_REPLACE_ADDR_1           0x00021218  //lld_con_llcp_tx   
#define PATCH_REPLACE_ADDR_2           0x00020aec  //lld_con_data_len_update     
#define PATCH_REPLACE_ADDR_3           0x00020a38  //lld_con_data_flow_set
#define PATCH_REPLACE_ADDR_5           0x000178AC 

#define PATCH_0_FUNC_OFFSET             0x13d1
#define PATCH_1_FUNC_OFFSET             0x1331
#define PATCH_2_FUNC_OFFSET             0x12bd
#define PATCH_3_FUNC_OFFSET             0x1219

#define np_lld_con_frm_cbk              0x479
#define np_lld_con_evt_canceled_cbk     0x1a1
#define np_lld_con_evt_start_cbk        0x1e1




#define PATCH_ROM_ADDR_0            (PATCH_REPLACE_ADDR_0 & 0xFFFFFFC0)
#define PATCH_ROM_ADDR_1            (PATCH_REPLACE_ADDR_1 & 0xFFFFFFC0)
#define PATCH_ROM_ADDR_2            (PATCH_REPLACE_ADDR_2 & 0xFFFFFFC0)
#define PATCH_ROM_ADDR_3            (PATCH_REPLACE_ADDR_3 & 0xFFFFFFC0)

#define PATCH_ROM_ADDR_5            (PATCH_REPLACE_ADDR_5 & 0xFFFFFFC0)

#define PATCH_RAM_ADDR_OFFSET_0     ((PATCH_REPLACE_ADDR_0 & 0x3F) + 0x4)
#define PATCH_RAM_ADDR_OFFSET_1     ((PATCH_REPLACE_ADDR_1 & 0x3F) + 0x4)
#define PATCH_RAM_ADDR_OFFSET_2     ((PATCH_REPLACE_ADDR_2 & 0x3F) + 0xC)  //special
#define PATCH_RAM_ADDR_OFFSET_3     ((PATCH_REPLACE_ADDR_3 & 0x3F) + 0x4)

#define PATCH_RAM_ADDR_OFFSET_5     ((PATCH_REPLACE_ADDR_5 & 0x3F) + 4)


/* Public typedef -----------------------------------------------------------*/
typedef struct
{
    __IO uint32_t RomAddrx:12;
    __IO uint32_t PatchAddrx:10;
    uint32_t      Reserved:10;

} PATCHDATAx_Type;

typedef struct
{
    uint32_t PATCHEN; 
    PATCHDATAx_Type PATCHDATAx[16];

} PATCH_Module;
/* Public define ------------------------------------------------------------*/
/* Public macro -------------------------------------------------------------*/
/* Public variables ---------------------------------------------------------*/


#if (_PATCH_LLD_COM_)
static __align(64) unsigned char  patch_0_Array[0x40] =
{
    0xff, 0xff, 0xff, 0x07, 0xff, 0x7f, 0x00, 0x00, 0xcc, 0x03, 0x00, 0x20, 0x71, 0x02, 0x00, 0x00, 
    0x91, 0xd7, 0x02, 0x00, 0x00, 0x4a, 0x10, 0x47, 0x11, 0x11, 0x11, 0x11, 0x85, 0x00, 0x70, 0x59, 
    0x0c, 0x27, 0x0c, 0x46, 0x00, 0x28, 0x7d, 0xd1, 0x00, 0x21, 0x98, 0x20, 0xf5, 0xf7, 0x1e, 0xfe, 
    0x70, 0x51, 0x05, 0x00, 0x76, 0xd0, 0x00, 0x20, 0x00, 0x90, 0x03, 0xf0, 0x0f, 0xfe, 0x05, 0x90
};
static __align(64) unsigned char  patch_1_Array[0x40] =
{
    0x00, 0x2c, 0xf2, 0xda, 0x00, 0x20, 0x28, 0x60, 0x68, 0x60, 0xa8, 0x60, 0xe8, 0x60, 0x70, 0xbd, 
    0x70, 0x47, 0x00, 0x00, 0x10, 0x04, 0x00, 0x20, 0x00, 0x4a, 0x10, 0x47, 0x11, 0x11, 0x11, 0x11,
    0x10, 0x86, 0x01, 0x22, 0x82, 0xf3, 0x10, 0x88, 0x01, 0x9a, 0x24, 0x4b, 0x95, 0x00, 0x5a, 0x59, 
    0x00, 0x2a, 0x3f, 0xd0, 0x17, 0x46, 0x80, 0x37, 0x51, 0x62, 0x78, 0x88, 0x08, 0x21, 0x08, 0x43 
};
static __align(64) unsigned char  patch_2_Array[0x40] =
{
    0xa2, 0x64, 0x43, 0x8f, 0x52, 0x1b, 0x5b, 0x1e, 0x12, 0x01, 0x12, 0x09, 0x43, 0x87, 0x8a, 0x42, 
    0xf2, 0xd8, 0x00, 0x22, 0x29, 0x46, 0x01, 0x98, 0x00, 0xf0, 0xd6, 0xff, 0x00, 0x20, 0x86, 0xf3, 
    0x10, 0x88, 0x03, 0xb0, 0xf0, 0xbd, 0x00, 0x00, 0x10, 0x04, 0x00, 0x20, 0x38, 0xb5, 0x04, 0x9c,
    0x00, 0x94, 0x01, 0x4c, 0xa0, 0x47, 0x38, 0xbd, 0x11, 0x11, 0x11, 0x11, 0x0a, 0x4c, 0xbd, 0x00 
};

static __align(64) unsigned char  patch_3_Array[0x40] =
{
    0x01, 0x22, 0x82, 0xf3, 0x10, 0x88, 0x09, 0x4d, 0x82, 0x00, 0xaa, 0x58, 0x00, 0x2a, 0x09, 0xd0, 
    0x70, 0x22, 0x50, 0x43, 0x06, 0x4a, 0x80, 0x18, 0x40, 0x8d, 0x06, 0x4a, 0xc0, 0xb2, 0x52, 0x69, 
    0x90, 0x47, 0x03, 0x46, 0x84, 0xf3, 0x10, 0x88, 0x18, 0x46, 0x70, 0xbd, 0x10, 0x04, 0x00, 0x20, 
    0x40, 0xc1, 0x02, 0x40, 0x74, 0x02, 0x00, 0x20, 0x00, 0x4a, 0x10, 0x47, 0x11, 0x11, 0x11, 0x11
};



//#define   ramcode_array_len  0x17b0
//#define   ramcode_array_crc  0x4db4
static __align(0x100) unsigned char  lld_con_Array[] ={
0x40,0xba,0x70,0x47,0xc0,0xba,0x70,0x47,0x30,0xb5,0x0b,0x46,0x01,0x46,0x00,0x20,
0x20,0x22,0x01,0x24,0x09,0xe0,0x0d,0x46,0xd5,0x40,0x9d,0x42,0x05,0xd3,0x1d,0x46,
0x95,0x40,0x49,0x1b,0x25,0x46,0x95,0x40,0x40,0x19,0x15,0x46,0x52,0x1e,0x00,0x2d,
0xf1,0xdc,0x30,0xbd,0xd2,0xb2,0x01,0xe0,0x02,0x70,0x40,0x1c,0x49,0x1e,0xfb,0xd2,
0x70,0x47,0x00,0x22,0xf6,0xe7,0x10,0xb5,0x13,0x46,0x0a,0x46,0x04,0x46,0x19,0x46,
0xff,0xf7,0xf0,0xff,0x20,0x46,0x10,0xbd,0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,
0x1d,0x5a,0x02,0x00,0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,0x19,0xc5,0x02,0x00,
0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,0x37,0x7e,0x00,0x00,0x03,0xb4,0x01,0x48,
0x01,0x90,0x01,0xbd,0x35,0xc8,0x02,0x00,0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,
0x79,0x7a,0x00,0x00,0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,0xaf,0x7f,0x00,0x00,
0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,0x0d,0x78,0x00,0x00,0x03,0xb4,0x01,0x48,
0x01,0x90,0x01,0xbd,0xd9,0x7b,0x01,0x00,0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,
0xc5,0xbe,0x02,0x00,0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,0x05,0x06,0x02,0x00,
0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,0x1d,0x5d,0x02,0x00,0x03,0xb4,0x01,0x48,
0x01,0x90,0x01,0xbd,0x39,0x7b,0x01,0x00,0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,
0xb1,0x7b,0x01,0x00,0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,0x15,0x05,0x02,0x00,
0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,0x49,0x5d,0x02,0x00,0x03,0xb4,0x01,0x48,
0x01,0x90,0x01,0xbd,0xc1,0x12,0x02,0x00,0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,
0x4d,0xae,0x02,0x00,0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,0x19,0xbc,0x02,0x00,
0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,0x2d,0x7a,0x01,0x00,0x70,0xb5,0x13,0x4b,
0x80,0x00,0x1c,0x58,0x12,0x48,0x80,0x34,0x00,0x78,0x13,0x4b,0x10,0x1a,0x11,0x4a,
0xc0,0x1e,0x50,0x43,0x62,0x7c,0x40,0x08,0x52,0x00,0x9a,0x5a,0x25,0x79,0x80,0x1a,
0xe2,0x88,0x96,0x38,0x90,0x42,0x00,0xd3,0x10,0x46,0x49,0x00,0x5a,0x5a,0x80,0x1a,
0xa2,0x78,0x53,0x06,0x09,0x4a,0x51,0x5a,0x01,0xd5,0x8a,0x00,0x80,0x1a,0xff,0xf7,
0x43,0xff,0x85,0x42,0x00,0xd3,0x05,0x46,0xa5,0x72,0x70,0xbd,0x10,0x04,0x00,0x20,
0xd8,0x00,0x00,0x20,0x71,0x02,0x00,0x00,0xe0,0xe4,0x02,0x00,0xd8,0xe4,0x02,0x00,
0x00,0x28,0x1a,0xd0,0x10,0xb5,0x04,0x46,0xff,0xf7,0x56,0xff,0x01,0x46,0x62,0x6e,
0xa0,0x6c,0x80,0x18,0x00,0x01,0x00,0x09,0xa0,0x64,0x20,0x46,0x40,0x30,0x42,0x8f,
0x52,0x1c,0x42,0x87,0x05,0x4a,0xa0,0x7d,0x52,0x7a,0x80,0x18,0xa0,0x75,0x80,0x34,
0x20,0x7b,0x01,0x22,0x00,0xf0,0xae,0xfc,0x10,0xbd,0x70,0x47,0x91,0xd7,0x02,0x00,
0x00,0x28,0x7d,0xd0,0xf0,0xb5,0x05,0x46,0x06,0x46,0x80,0x35,0x8b,0xb0,0x28,0x7b,
0x00,0x21,0x09,0x91,0x08,0x90,0xa9,0x78,0xc9,0x06,0x04,0xd4,0x71,0x6a,0x00,0x29,
0x01,0xd0,0x00,0xf0,0x75,0xfe,0x34,0x46,0x40,0x34,0x20,0x8f,0x61,0x8f,0x40,0x18,
0x20,0x87,0x08,0x9f,0x70,0x21,0x4f,0x43,0x57,0x49,0x79,0x18,0x00,0x91,0x08,0x86,
0x68,0x88,0xff,0x21,0x01,0x31,0x88,0x43,0x68,0x80,0x80,0x05,0x15,0xd5,0x60,0x8f,
0xe9,0x7a,0x48,0x43,0xe1,0x8f,0x40,0x18,0x25,0x21,0xff,0xf7,0xe5,0xfe,0x08,0xb2,
0x00,0x28,0x01,0xda,0x25,0x30,0x00,0xb2,0x4c,0x4a,0xc1,0xb2,0xbb,0x18,0x1a,0x8d,
0x92,0x09,0x92,0x01,0x0a,0x43,0x1a,0x85,0xe0,0x87,0x00,0x20,0x60,0x87,0xa8,0x78,
0xc0,0x07,0x19,0xd0,0xf0,0x6c,0x46,0x49,0x40,0x1c,0x40,0x08,0x88,0x42,0x0b,0xd9,
0x44,0x49,0x4a,0x1e,0x80,0x18,0xff,0xf7,0xc7,0xfe,0x01,0x21,0xc9,0x03,0x01,0x43,
0x3e,0x48,0x38,0x18,0xc1,0x85,0x07,0xe0,0xc1,0x03,0x01,0x20,0xc0,0x03,0x08,0x18,
0x3a,0x49,0x00,0x0c,0x79,0x18,0xc8,0x85,0xa1,0x79,0x00,0x29,0x3f,0xd0,0x20,0x8f,
0xa2,0x88,0x80,0x1a,0x38,0x4a,0x80,0xb2,0x90,0x42,0x38,0xd2,0x30,0x46,0x20,0x30,
0x02,0x29,0x18,0xd1,0x31,0x46,0x34,0x31,0x4a,0x78,0x09,0x78,0x12,0x02,0x0a,0x43,
0x00,0x99,0x4a,0x80,0x31,0x46,0x36,0x31,0x4a,0x78,0x0b,0x78,0x11,0x02,0x00,0x9a,
0x19,0x43,0x91,0x80,0x00,0x99,0x02,0x7e,0xcb,0x88,0x5b,0x09,0x5b,0x01,0x00,0xe0,
0x49,0xe0,0x13,0x43,0xcb,0x80,0xa1,0x79,0x03,0x29,0x10,0xd1,0x23,0x49,0x43,0x7d,
0x79,0x18,0xca,0x8a,0x9c,0x46,0x0c,0x23,0x9a,0x43,0x63,0x46,0x9b,0x00,0x1a,0x43,
0xca,0x82,0x00,0x7d,0xca,0x8a,0x92,0x08,0x92,0x00,0x02,0x43,0xca,0x82,0xa0,0x79,
0x01,0x28,0x02,0xd1,0xe0,0x78,0x00,0x28,0x01,0xd0,0x01,0x20,0x09,0x90,0x1b,0x48,
0x01,0x68,0x00,0x29,0x01,0xd1,0x1a,0x49,0x01,0x60,0x00,0x91,0x70,0x68,0x01,0x90,
0xb0,0x68,0x02,0x90,0x69,0x46,0x08,0x98,0x08,0x76,0x08,0x98,0x04,0x90,0x30,0x69,
0x03,0x90,0xb0,0x7d,0x08,0x75,0x00,0x20,0x48,0x75,0x88,0x75,0x0f,0x22,0xca,0x75,
0x88,0x76,0x08,0x77,0x48,0x76,0x68,0x46,0xff,0xf7,0x84,0xfe,0x68,0x7b,0x02,0x28,
0x01,0xd0,0x01,0x20,0x68,0x73,0x09,0x98,0x00,0x28,0x02,0xd0,0x28,0x7b,0x00,0xf0,
0xfb,0xfe,0x0b,0xb0,0xf0,0xbd,0x70,0x47,0x80,0xc1,0x02,0x40,0x40,0xc1,0x02,0x40,
0xff,0x3f,0x00,0x00,0x71,0x02,0x00,0x00,0xff,0x7f,0x00,0x00,0x00,0x0d,0x00,0x20,
0x79,0x84,0x00,0x20,0xf0,0xb5,0x06,0x46,0x30,0x49,0x80,0x00,0x0d,0x58,0x83,0xb0,
0x2c,0x46,0x80,0x34,0xa0,0x7a,0x27,0x46,0x00,0x1d,0xa1,0x7c,0xc0,0xb2,0xff,0xf7,
0x5f,0xfe,0x00,0x90,0x2a,0x4a,0x70,0x00,0x10,0x5c,0x61,0x7c,0x00,0x1d,0xc0,0xb2,
0xff,0xf7,0x56,0xfe,0x21,0x89,0x88,0x42,0x00,0xd3,0x08,0x46,0x00,0x99,0x08,0x18,
0xe7,0x21,0x89,0x00,0x01,0x90,0x40,0x18,0x22,0x49,0xff,0xf7,0x15,0xfe,0x22,0x4a,
0x69,0x6e,0x12,0x78,0x8a,0x1a,0x92,0x1e,0x54,0x08,0x84,0x42,0x00,0xd9,0x24,0x1a,
0xb8,0x78,0xc0,0x07,0x19,0xd0,0x1d,0x48,0x02,0x89,0x28,0x46,0x40,0x30,0x00,0x90,
0xc0,0x8e,0x10,0x18,0x48,0x43,0x19,0x21,0x89,0x01,0xff,0xf7,0xfd,0xfd,0x15,0x49,
0x10,0x30,0x4a,0x1e,0x80,0x18,0xff,0xf7,0xf7,0xfd,0x24,0x1a,0x00,0x98,0x80,0x8e,
0x00,0x28,0x02,0xd0,0x84,0x42,0x00,0xd3,0x04,0x46,0x70,0x20,0x46,0x43,0x10,0x48,
0x30,0x18,0x04,0x80,0x0f,0x48,0x30,0x18,0xc4,0x87,0x01,0x98,0x55,0x21,0x40,0x00,
0xc9,0x00,0x40,0x18,0xe8,0x65,0x28,0x61,0x00,0x21,0x00,0x91,0x83,0xb2,0x39,0x7b,
0x04,0x20,0x6a,0x6e,0xff,0xf7,0x12,0xfe,0x03,0xb0,0xf0,0xbd,0x10,0x04,0x00,0x20,
0xf8,0x0c,0x00,0x20,0x71,0x02,0x00,0x00,0xd8,0x00,0x00,0x20,0xcc,0x03,0x00,0x20,
0x80,0xc1,0x02,0x40,0x40,0xc1,0x02,0x40,0xf0,0xb5,0x0b,0x06,0x9b,0x0d,0x6e,0x4c,
0x83,0xb0,0x05,0x2a,0x0d,0xd2,0x15,0x00,0x7d,0x44,0x2d,0x79,0x6d,0x19,0xaf,0x44,
0x02,0x0a,0x12,0x1c,0xa3,0x00,0xcb,0xb2,0x01,0x46,0x00,0x22,0x18,0x46,0x00,0xf0,
0xd9,0xf8,0x03,0xb0,0xf0,0xbd,0xcb,0xb2,0x01,0x46,0x01,0x22,0x18,0x46,0x00,0xf0,
0xd1,0xf8,0x03,0xb0,0xf0,0xbd,0xe3,0x58,0xca,0xb2,0x00,0x2b,0xf9,0xd0,0x01,0x46,
0x10,0x46,0x00,0xf0,0x1f,0xf9,0x03,0xb0,0xf0,0xbd,0xc8,0xb2,0x00,0x90,0xe6,0x58,
0x00,0x2e,0xf8,0xd0,0x34,0x46,0x01,0x46,0x80,0x34,0x20,0x7b,0x37,0x46,0xc2,0x00,
0x10,0x1a,0xa2,0x7b,0x80,0x18,0x28,0x37,0x02,0x97,0xc0,0xb2,0x0f,0x02,0x51,0xe0,
0x48,0x88,0x82,0x07,0x88,0x88,0x92,0x0f,0x01,0x2a,0x09,0xd0,0x02,0x2a,0x07,0xd0,
0x03,0x2a,0x29,0xd1,0xff,0xf7,0xc0,0xfd,0x79,0x1c,0xff,0x22,0x4b,0x48,0x21,0xe0,
0x49,0x88,0x09,0x0a,0x04,0x29,0x04,0xd9,0xa2,0x78,0x52,0x06,0x01,0xd5,0x09,0x1f,
0x89,0xb2,0x00,0x29,0x18,0xd0,0xb5,0x6a,0x40,0x18,0xea,0x88,0xa9,0x88,0x92,0x05,
0x92,0x0d,0x89,0x18,0x88,0x42,0x0f,0xd3,0x02,0x98,0xff,0xf7,0xab,0xfd,0x30,0x6b,
0xa8,0x42,0x01,0xd1,0x00,0x20,0x30,0x63,0xa8,0x88,0xff,0xf7,0xa9,0xfd,0x79,0x1c,
0xff,0x22,0x3b,0x48,0xff,0xf7,0xaa,0xfd,0x3a,0x48,0x01,0x78,0x1c,0x20,0x41,0x43,
0x39,0x48,0x08,0x18,0x81,0x08,0x01,0x98,0x89,0x00,0x09,0x18,0x37,0x48,0x08,0x18,
0x41,0x88,0x10,0x22,0x91,0x43,0x41,0x80,0x20,0x7c,0x02,0x21,0x40,0x1e,0x20,0x74,
0xa0,0x7b,0x40,0x1c,0xff,0xf7,0x40,0xfd,0xa1,0x73,0x20,0x7b,0xc2,0x00,0x10,0x1a,
0x40,0x18,0xc0,0xb2,0x21,0x7c,0x00,0x29,0x0f,0xd0,0x2a,0x4a,0x1c,0x23,0x11,0x78,
0x00,0x01,0x59,0x43,0x28,0x4b,0x01,0x90,0xc9,0x18,0x89,0x08,0x89,0x00,0x09,0x18,
0x26,0x48,0x09,0x18,0x0d,0x88,0xed,0x0b,0x9a,0xd1,0x61,0x88,0x08,0x20,0x81,0x43,
0x20,0x7c,0x00,0x28,0x00,0xd0,0x01,0x20,0xc0,0x00,0x01,0x43,0x61,0x80,0x00,0x98,
0x00,0xf0,0x8e,0xfc,0x03,0xb0,0xf0,0xbd,0xe4,0x58,0xcd,0xb2,0x00,0x2c,0xf9,0xd0,
0xff,0xf7,0x3a,0xfd,0x06,0x46,0x01,0x21,0x20,0x46,0xff,0xf7,0x65,0xfd,0x20,0x46,
0x80,0x30,0x01,0x46,0x40,0x7b,0x02,0x28,0x16,0xd0,0xa2,0x6c,0x60,0x6e,0x10,0x18,
0x02,0x01,0x12,0x09,0x20,0x46,0x40,0x30,0xa2,0x64,0x42,0x8f,0x52,0x1c,0x42,0x87,
0x0f,0x4a,0xa0,0x7d,0x52,0x7a,0x80,0x18,0xa0,0x75,0x08,0x7b,0x01,0x22,0x31,0x46,
0x00,0xf0,0x88,0xfa,0x03,0xb0,0xf0,0xbd,0x16,0x22,0x01,0x21,0x28,0x46,0xff,0xf7,
0x49,0xfd,0x03,0xb0,0xf0,0xbd,0x00,0x00,0x10,0x04,0x00,0x20,0x0d,0x02,0x00,0x00,
0x0f,0x02,0x00,0x00,0x03,0x01,0x00,0x20,0x8b,0x05,0x00,0x00,0x00,0xc0,0x02,0x40,
0x91,0xd7,0x02,0x00,0xf8,0xb5,0x07,0x46,0x81,0x00,0x28,0x48,0x16,0x46,0x44,0x58,
0x00,0x2c,0x22,0xd0,0x01,0x21,0x20,0x46,0xff,0xf7,0x26,0xfd,0x25,0x46,0x80,0x35,
0x68,0x7b,0x02,0x28,0x0f,0xd0,0xff,0xf7,0xef,0xfc,0x01,0x46,0x6a,0x88,0x04,0x20,
0x93,0x07,0x13,0xd5,0x53,0x07,0x11,0xd4,0x12,0x07,0x0f,0xd4,0x46,0x22,0x12,0x5d,
0x01,0x2a,0x0b,0xd0,0x0b,0xe0,0xa8,0x78,0x00,0x06,0x01,0xd5,0x3d,0x22,0x00,0xe0,
0x16,0x22,0x01,0x21,0x38,0x46,0xff,0xf7,0x0d,0xfd,0xf8,0xbd,0x05,0x20,0x63,0x6e,
0xa2,0x6c,0xd2,0x18,0x12,0x01,0x12,0x09,0xa2,0x64,0x22,0x46,0x40,0x32,0x53,0x8f,
0x5b,0x1c,0x53,0x87,0x0e,0x4a,0x00,0x2e,0x05,0xd0,0x40,0x00,0x80,0x18,0xa3,0x7d,
0x40,0x78,0x18,0x18,0x01,0xe0,0x40,0x00,0x10,0x5c,0xa0,0x75,0x68,0x88,0x22,0x46,
0xc0,0x05,0x03,0xd5,0x20,0x6d,0x92,0x6d,0x90,0x42,0x01,0xd0,0x01,0x22,0x00,0xe0,
0x00,0x22,0x38,0x46,0x00,0xf0,0x1e,0xfa,0xf8,0xbd,0x00,0x00,0x10,0x04,0x00,0x20,
0x91,0xd7,0x02,0x00,0xf3,0xb5,0x8d,0xb0,0x0d,0x98,0xf8,0x49,0x80,0x00,0x0c,0x58,
0x04,0x26,0x25,0x46,0x80,0x35,0x68,0x88,0x30,0x43,0x68,0x80,0x0d,0x98,0xff,0xf7,
0xd7,0xfc,0x00,0x28,0x7b,0xd0,0xf2,0x48,0x0c,0x90,0x0d,0x98,0x27,0x46,0x00,0x02,
0x03,0x90,0xf0,0x48,0x40,0x37,0x0b,0x90,0x0c,0x98,0x1c,0x21,0x00,0x7b,0x48,0x43,
0xed,0x49,0x40,0x18,0x00,0x90,0x41,0x89,0x04,0x91,0x81,0x89,0x02,0x91,0x89,0x07,
0x89,0x0f,0x01,0x91,0xc1,0x89,0xca,0xb2,0x89,0x04,0x89,0x0e,0x0a,0x92,0x05,0x91,
0x00,0x21,0x09,0x91,0x0e,0x46,0x07,0x91,0x61,0x6d,0x06,0x91,0x04,0x99,0xc9,0x07,
0x7e,0xd1,0x69,0x88,0xca,0x07,0x04,0xd0,0x42,0x8a,0x00,0x8a,0x16,0x04,0x06,0x43,
0x26,0x65,0xc8,0x05,0x75,0xd4,0xff,0x20,0x01,0x30,0x01,0x43,0x69,0x80,0xc8,0x07,
0x0a,0xd0,0xb8,0x79,0x01,0x28,0x07,0xd1,0xb8,0x78,0x00,0x28,0x04,0xd0,0x01,0x20,
0xf8,0x70,0x0d,0x98,0x00,0xf0,0xe0,0xfc,0x38,0x8f,0xb8,0x87,0x69,0x88,0xc8,0x07,
0x36,0xd0,0x00,0x98,0x80,0x8a,0x27,0x22,0x80,0x05,0x80,0x0d,0x12,0x01,0x10,0x1a,
0x6a,0x7c,0xce,0x4b,0x52,0x00,0x9a,0x5a,0x52,0x00,0x80,0x1a,0x00,0xb2,0x00,0x28,
0x07,0xda,0xcb,0x4a,0x76,0x1e,0x80,0x18,0x36,0x01,0x00,0xb2,0x36,0x09,0x00,0x28,
0xf8,0xdb,0xf8,0x85,0xa6,0x64,0x66,0x65,0x88,0x07,0x1d,0xd4,0x02,0x20,0x01,0x43,
0x69,0x80,0xc8,0x07,0x39,0xd0,0x03,0x99,0x85,0x20,0x02,0x23,0xff,0x22,0x80,0x00,
0x49,0x1c,0xff,0xf7,0x6b,0xfc,0x06,0x46,0x60,0x6d,0x61,0x6e,0x40,0x08,0x49,0x08,
0xff,0xf7,0xfa,0xfb,0x31,0x80,0x30,0x46,0xff,0xf7,0x66,0xfc,0x25,0xe0,0x87,0xe1,
0xa0,0x6c,0x20,0x65,0x60,0x65,0xdf,0xe7,0xc8,0x07,0x1e,0xd0,0x60,0x6d,0x41,0x08,
0x06,0x98,0x40,0x08,0x08,0x1a,0x61,0x6e,0x00,0x01,0x00,0x09,0x49,0x08,0xff,0xf7,
0xe3,0xfb,0x00,0x29,0x11,0xd0,0x03,0x99,0x02,0x23,0xff,0x22,0xad,0x48,0x49,0x1c,
0xff,0xf7,0x44,0xfc,0x06,0x46,0x60,0x6d,0x61,0x6e,0x40,0x08,0x49,0x08,0xff,0xf7,
0xd3,0xfb,0x31,0x80,0x30,0x46,0xff,0xf7,0x3f,0xfc,0x68,0x88,0x41,0x05,0x01,0xe0,
0x8c,0xe0,0x09,0xe0,0x08,0xd4,0x81,0x07,0x06,0xd5,0x02,0x99,0x49,0x07,0x03,0xd5,
0x01,0x21,0x89,0x02,0x08,0x43,0x68,0x80,0x04,0x98,0x00,0x07,0x7e,0xd4,0x20,0x6d,
0xa0,0x65,0x01,0x20,0x09,0x90,0x04,0x98,0x66,0x21,0x08,0x42,0x76,0xd1,0x04,0x98,
0xc0,0x06,0x06,0xd5,0x68,0x88,0x80,0x21,0x08,0x43,0x68,0x80,0x02,0x20,0x68,0x73,
0xbf,0xe0,0x02,0x98,0x06,0x0a,0x14,0xd0,0x01,0x98,0x00,0x28,0x66,0xd0,0x04,0x2e,
0x04,0xd9,0xa8,0x78,0x80,0x06,0x01,0xd5,0x36,0x1f,0xb6,0xb2,0x00,0x98,0x80,0x8b,
0x06,0x90,0x01,0x98,0x03,0x28,0x0e,0xd0,0x01,0x28,0x1b,0xd0,0x02,0x28,0x19,0xd0,
0xa7,0xe0,0x68,0x88,0x04,0x21,0x88,0x43,0x02,0x99,0xc9,0x06,0xc9,0x0f,0x89,0x00,
0x08,0x43,0x68,0x80,0x9d,0xe0,0xb0,0x1d,0x83,0xb2,0x03,0x99,0x83,0x20,0xff,0x22,
0x80,0x00,0x49,0x1c,0xff,0xf7,0xea,0xfb,0x86,0x70,0x06,0x99,0x81,0x80,0x39,0x8f,
0x01,0x80,0x0b,0xe0,0x03,0x99,0x06,0x23,0xff,0x22,0x7b,0x48,0x49,0x1c,0xff,0xf7,
0xdd,0xfb,0x06,0x99,0x01,0x80,0x46,0x80,0x01,0x99,0x01,0x71,0xff,0xf7,0xdc,0xfb,
0x00,0x98,0x00,0x8c,0x08,0x90,0x00,0x28,0x5e,0xd0,0x02,0x98,0x80,0x06,0x75,0xd5,
0x04,0x98,0x00,0x28,0x72,0xd1,0x03,0x99,0x0c,0x23,0xff,0x22,0x6f,0x48,0x49,0x1c,
0xff,0xf7,0xc4,0xfb,0x06,0x46,0x00,0x98,0xc0,0x8b,0x01,0x90,0xc0,0x06,0xc0,0x0e,
0x70,0x70,0x01,0x98,0x00,0x06,0x80,0x0f,0xb0,0x70,0x69,0x7c,0x68,0x48,0x40,0x5c,
0x30,0x71,0x05,0x98,0x70,0x71,0x67,0x48,0xc1,0x69,0x0a,0x98,0x88,0x47,0x01,0x46,
0x0a,0x20,0x41,0x43,0xf1,0x80,0x00,0x20,0x30,0x72,0x00,0xe0,0x51,0xe0,0x38,0x8f,
0x70,0x81,0x01,0x98,0x1c,0x21,0x00,0x0a,0xf0,0x70,0x5f,0x48,0x5f,0x4a,0x00,0x78,
0x41,0x43,0x89,0x18,0x89,0x08,0x89,0x00,0xff,0x31,0xc4,0x31,0x89,0x08,0x89,0x00,
0xff,0x31,0x1c,0x31,0x89,0x08,0x89,0x00,0xff,0x31,0x8a,0x08,0x58,0x49,0x92,0x00,
0x51,0x18,0x89,0x08,0x89,0x00,0x69,0x31,0x89,0x08,0x89,0x00,0x00,0x02,0x09,0x18,
0x54,0x48,0x08,0x18,0x81,0x08,0x54,0x48,0x89,0x00,0x08,0x18,0x81,0x08,0x08,0x98,
0x89,0x00,0x40,0x1a,0xa8,0x21,0xff,0xf7,0x0f,0xfb,0x30,0x70,0x30,0x46,0xff,0xf7,
0x7b,0xfb,0x01,0x20,0x07,0x90,0x19,0xe0,0x01,0x98,0x03,0x28,0x16,0xd1,0x4b,0x49,
0x06,0x98,0x40,0x18,0x00,0x78,0x1b,0x28,0x10,0xd1,0x02,0x98,0x80,0x06,0x0d,0xd4,
0x03,0x99,0x0c,0x23,0xff,0x22,0x3d,0x48,0x49,0x1c,0xff,0xf7,0x5f,0xfb,0x00,0x21,
0x41,0x70,0xc1,0x70,0xff,0xf7,0x60,0xfb,0x01,0x20,0x07,0x90,0x00,0x99,0x00,0x20,
0x88,0x83,0xff,0xf7,0x11,0xfb,0x06,0x46,0x36,0x48,0xc1,0x69,0x0a,0x98,0x88,0x47,
0xe8,0x74,0x09,0x99,0x00,0x29,0x05,0xd0,0x32,0x46,0x01,0x21,0x05,0x98,0xff,0xf7,
0x51,0xfb,0x09,0xe0,0x0b,0x99,0x10,0x22,0x8a,0x56,0x90,0x42,0x04,0xdd,0x32,0x46,
0x00,0x21,0x05,0x98,0xff,0xf7,0x46,0xfb,0x07,0x98,0x00,0x28,0x36,0xd1,0x00,0x98,
0x00,0x8c,0x00,0x28,0x32,0xd0,0x28,0x49,0x1c,0x22,0x09,0x78,0x0b,0x46,0x53,0x43,
0x26,0x4a,0x09,0x02,0x9a,0x18,0x92,0x08,0x92,0x00,0xff,0x32,0xc4,0x32,0x92,0x08,
0x92,0x00,0xff,0x32,0x1c,0x32,0x92,0x08,0x92,0x00,0xff,0x32,0x93,0x08,0x20,0x4a,
0x9b,0x00,0x9a,0x18,0x92,0x08,0x92,0x00,0x69,0x32,0x92,0x08,0x92,0x00,0x52,0x18,
0x1c,0x49,0x51,0x18,0x8a,0x08,0x1c,0x49,0x92,0x00,0x51,0x18,0x8e,0x08,0xb6,0x00,
0x80,0x1b,0xa8,0x21,0xff,0xf7,0xa0,0xfa,0x80,0xb2,0xa8,0x21,0x48,0x43,0x31,0x18,
0x16,0x48,0x08,0x18,0x01,0x88,0x49,0x04,0x49,0x0c,0x01,0x80,0xff,0xf7,0x10,0xfb,
0x0d,0x98,0xff,0xf7,0xf5,0xfa,0x00,0x28,0x22,0xd0,0x25,0xe6,0x10,0x04,0x00,0x20,
0xcc,0x03,0x00,0x20,0x94,0x02,0x00,0x20,0x80,0xc5,0x02,0x40,0x18,0x00,0x00,0x20,
0x71,0x02,0x00,0x00,0x15,0x02,0x00,0x00,0x0e,0x02,0x00,0x00,0x16,0x02,0x00,0x00,
0x76,0xd7,0x02,0x00,0x74,0x02,0x00,0x20,0x03,0x01,0x00,0x20,0x8b,0x05,0x00,0x00,
0xdb,0x13,0x00,0x00,0x03,0x03,0x00,0x00,0x03,0x06,0x00,0x00,0x00,0xc0,0x02,0x40,
0x0f,0xb0,0xf0,0xbd,0xf7,0xb5,0x8c,0xb0,0x0c,0x98,0x81,0x00,0xe5,0x48,0x44,0x58,
0x00,0x20,0x0a,0x90,0x26,0x46,0x00,0x90,0x80,0x36,0x01,0x94,0x71,0x7c,0xe2,0x48,
0x40,0x5c,0x03,0x28,0x0d,0xd0,0x0e,0x20,0x40,0x00,0x04,0x90,0x70,0x88,0xa5,0x6c,
0x81,0x07,0x37,0xd5,0xc0,0x07,0x35,0xd0,0x00,0x20,0x30,0x75,0x00,0x2a,0x02,0xd0,
0x30,0xe0,0x70,0x20,0xf0,0xe7,0x21,0x46,0x40,0x31,0x48,0x8e,0x00,0x28,0x29,0xd0,
0x72,0x88,0x53,0x05,0x26,0xd5,0x53,0x07,0x24,0xd4,0x12,0x07,0x22,0xd4,0x8a,0x79,
0x00,0x2a,0x13,0xd0,0x8b,0x88,0x01,0x2a,0x00,0xd0,0x00,0x22,0x9a,0x1a,0x0b,0x8f,
0x92,0xb2,0x9c,0x46,0x9b,0x1a,0x9f,0xb2,0xcc,0x4b,0x9f,0x42,0x12,0xd3,0x63,0x46,
0xd2,0x1a,0x52,0x1e,0x90,0x42,0x00,0xd3,0x10,0x46,0x80,0xb2,0x00,0x28,0x09,0xd0,
0x62,0x6e,0x42,0x43,0x52,0x19,0x15,0x01,0x4a,0x8f,0x2d,0x09,0x10,0x18,0x48,0x87,
0x01,0x20,0x30,0x75,0x0d,0x98,0xc2,0x4b,0x40,0x1b,0x00,0x01,0x00,0x09,0x98,0x42,
0x0e,0xd2,0x20,0x46,0x62,0x6e,0x40,0x30,0x51,0x19,0x0d,0x01,0x41,0x8f,0x2d,0x09,
0x49,0x1c,0x41,0x87,0x0d,0x99,0x49,0x1b,0x09,0x01,0x09,0x09,0x99,0x42,0xf3,0xd3,
0xa0,0x6d,0x27,0x46,0x40,0x37,0x05,0x90,0xb8,0x79,0x01,0x28,0x42,0xd1,0xf8,0x78,
0x00,0x28,0x3f,0xd1,0x38,0x8f,0x79,0x8f,0x40,0x18,0xb9,0x88,0x40,0x1a,0x81,0xb2,
0xae,0x48,0x81,0x42,0x36,0xd2,0xb8,0x78,0x00,0x28,0x1d,0xd1,0xa0,0x8f,0x40,0x19,
0x05,0x01,0x70,0x88,0x2d,0x09,0xc1,0x07,0x04,0xd0,0x39,0x88,0x49,0x08,0x49,0x19,
0x0d,0x01,0x2d,0x09,0x61,0x6b,0x61,0x66,0xe1,0x8f,0x79,0x86,0xa1,0x6b,0xa1,0x66,
0x01,0x21,0xb9,0x70,0xc0,0x07,0x05,0xd0,0x30,0x7b,0xff,0xf7,0x57,0xfa,0xb0,0x78,
0xc0,0x07,0x01,0xd1,0x01,0x20,0xf8,0x70,0x05,0x95,0x38,0x8f,0x79,0x8f,0x40,0x18,
0xb9,0x88,0x40,0x1a,0x81,0xb2,0x48,0x1e,0x80,0xb2,0x00,0x29,0x0a,0xd0,0x62,0x6e,
0x05,0x99,0x89,0x1a,0x09,0x01,0x09,0x09,0x05,0x91,0x01,0x46,0x40,0x1e,0x80,0xb2,
0x00,0x29,0xf5,0xd1,0xb0,0x78,0x80,0x07,0x01,0xd5,0xa0,0x6e,0x02,0xe0,0x60,0x6e,
0x06,0x21,0x48,0x43,0x03,0x90,0x05,0x98,0x28,0x1a,0x01,0x01,0x03,0x98,0x09,0x09,
0x81,0x42,0x7d,0xd2,0x8b,0x48,0x09,0x90,0x20,0x46,0x20,0x30,0x08,0x90,0x02,0x95,
0xb0,0x78,0xc0,0x07,0x75,0xd0,0x70,0x7c,0x06,0x90,0x00,0x20,0x07,0x90,0x2e,0x20,
0x38,0x5e,0x00,0x90,0x21,0x6d,0x68,0x1a,0x00,0x01,0x00,0x09,0x04,0x90,0xff,0xf7,
0x1b,0xfa,0x00,0x28,0x01,0xd0,0x14,0x20,0x01,0xe0,0x09,0x98,0x00,0x89,0xf9,0x8e,
0x40,0x18,0x04,0x99,0x48,0x43,0x19,0x21,0x89,0x01,0xff,0xf7,0x85,0xf9,0x01,0x46,
0x80,0x00,0x40,0x31,0xff,0x30,0x01,0x30,0x04,0x90,0xb0,0x78,0x80,0x07,0x07,0xd4,
0x01,0x20,0x07,0x90,0x38,0x8e,0x74,0x4a,0x50,0x43,0x04,0x9a,0x80,0x18,0x04,0x90,
0xb8,0x79,0x01,0x28,0x05,0xd1,0xb8,0x78,0x00,0x28,0x02,0xd0,0xf8,0x78,0x00,0x28,
0x03,0xd0,0x07,0x98,0x00,0x28,0x07,0xd0,0x0e,0xe0,0x38,0x88,0x6a,0x49,0x48,0x43,
0x04,0x99,0x40,0x18,0x04,0x90,0x07,0xe0,0x67,0x4a,0x60,0x6e,0x50,0x43,0x40,0x08,
0xff,0x38,0x2d,0x38,0x88,0x42,0x2b,0xd9,0x04,0x98,0x41,0x08,0x07,0x91,0x62,0x49,
0x07,0x98,0xff,0xf7,0x51,0xf9,0x02,0x99,0x09,0x1a,0x09,0x01,0x09,0x09,0x02,0x91,
0x5d,0x49,0x48,0x43,0x07,0x99,0x09,0x1a,0x00,0x98,0x40,0x1a,0x00,0x90,0x08,0xd5,
0x02,0x98,0x59,0x49,0x40,0x1e,0x00,0x01,0x00,0x09,0x02,0x90,0x00,0x98,0x40,0x18,
0x00,0x90,0x01,0x99,0x88,0x60,0xb8,0x79,0x03,0x28,0x0e,0xd1,0x38,0x8f,0x79,0x8f,
0x40,0x18,0xb9,0x88,0x40,0x1a,0x81,0xb2,0x4c,0x48,0x81,0x42,0x05,0xd2,0x01,0xe0,
0x75,0xe0,0x0f,0xe0,0x08,0x98,0x40,0x7d,0x06,0x90,0x47,0x48,0x06,0x99,0x40,0x5c,
0x03,0x28,0x02,0xd1,0x04,0x98,0xc4,0x30,0x04,0x90,0xe1,0x6d,0x04,0x98,0x09,0x18,
0x01,0x98,0x01,0x61,0x01,0x98,0x02,0x99,0x41,0x60,0x01,0x98,0xff,0xf7,0xa2,0xf9,
0x00,0x28,0x5f,0xd0,0x01,0x98,0x81,0x7d,0x40,0x48,0x40,0x7a,0x08,0x18,0x01,0x99,
0x88,0x75,0x60,0x6e,0x40,0x19,0x05,0x01,0x78,0x8f,0x2d,0x09,0x40,0x1c,0x80,0xb2,
0x78,0x87,0xb9,0x79,0x01,0x29,0x42,0xd1,0xf9,0x78,0x00,0x29,0x3f,0xd1,0x39,0x8f,
0x08,0x18,0xb9,0x88,0x40,0x1a,0x81,0xb2,0x30,0x48,0x81,0x42,0x37,0xd2,0xb8,0x78,
0x00,0x28,0x1e,0xd1,0xa0,0x8f,0x40,0x19,0x05,0x01,0x70,0x88,0x2d,0x09,0xc1,0x07,
0x04,0xd0,0x39,0x88,0x49,0x08,0x49,0x19,0x0d,0x01,0x2d,0x09,0x61,0x6b,0x61,0x66,
0xe1,0x8f,0x79,0x86,0xa1,0x6b,0xa1,0x66,0xc0,0x07,0x02,0xd0,0x30,0x7b,0xff,0xf7,
0x5d,0xf9,0x01,0x20,0xb8,0x70,0xa1,0x6e,0x03,0x91,0xb1,0x78,0xc9,0x07,0x00,0xd1,
0xf8,0x70,0x05,0x95,0x38,0x8f,0x79,0x8f,0x40,0x18,0xb9,0x88,0x40,0x1a,0x81,0xb2,
0x48,0x1e,0x80,0xb2,0x00,0x29,0x0a,0xd0,0x62,0x6e,0x05,0x99,0x89,0x1a,0x09,0x01,
0x09,0x09,0x05,0x91,0x01,0x46,0x40,0x1e,0x80,0xb2,0x00,0x29,0xf5,0xd1,0x05,0x98,
0x28,0x1a,0x01,0x01,0x03,0x98,0x09,0x09,0x81,0x42,0x00,0xd2,0x0f,0xe7,0x0a,0x98,
0x00,0x28,0x0b,0xd0,0x00,0x20,0x70,0x73,0xa5,0x64,0xb0,0x78,0xc0,0x07,0x03,0xd0,
0x00,0x98,0xb8,0x85,0x04,0x98,0xe0,0x64,0x0f,0xb0,0xf0,0xbd,0xb0,0x78,0x80,0x07,
0x01,0xd5,0x08,0x22,0x00,0xe0,0x3e,0x22,0x01,0x21,0x0c,0x98,0xff,0xf7,0xfa,0xf8,
0x0f,0xb0,0xf0,0xbd,0x10,0x04,0x00,0x20,0x76,0xd7,0x02,0x00,0xff,0x7f,0x00,0x00,
0xff,0xff,0xff,0x07,0xcc,0x03,0x00,0x20,0x71,0x02,0x00,0x00,0x91,0xd7,0x02,0x00,
0xf0,0xb5,0x99,0x49,0x80,0x00,0x0f,0x58,0x89,0xb0,0x38,0x6b,0x00,0x28,0x08,0xd1,
0xb8,0x6a,0x38,0x63,0x00,0x28,0x04,0xd0,0xc0,0x88,0x81,0x05,0x89,0x0d,0x80,0x20,
0xc1,0x53,0x3c,0x46,0x80,0x34,0x60,0x88,0x3d,0x6b,0xc1,0x06,0x09,0xd5,0x00,0x2d,
0x07,0xd0,0x21,0x88,0x00,0x29,0x02,0xd1,0x29,0x68,0x00,0x29,0x01,0xd0,0x01,0x21,
0x00,0xe0,0x00,0x21,0x01,0x91,0x7a,0x6a,0x00,0x92,0x0a,0x43,0x42,0xd0,0x81,0x04,
0x01,0xd4,0xc0,0x06,0x01,0xd4,0x01,0x20,0x00,0xe0,0x00,0x20,0x05,0x90,0x20,0x7c,
0x10,0x26,0x02,0x28,0x16,0xd0,0x04,0x90,0x34,0xd2,0x00,0x20,0x02,0x90,0x00,0x98,
0x00,0x28,0x33,0xd0,0x86,0x79,0x80,0x88,0x03,0x21,0x03,0x91,0x7b,0x49,0x06,0x90,
0x40,0x18,0x00,0x78,0x1b,0x28,0x27,0xd0,0x00,0x20,0x02,0x90,0x00,0x20,0x78,0x62,
0x00,0x90,0x4f,0xe0,0xe0,0x7b,0x02,0x21,0x40,0x1c,0xff,0xf7,0x3d,0xf8,0x20,0x7b,
0xc2,0x00,0x10,0x1a,0x08,0x18,0x05,0x99,0xc0,0xb2,0x00,0x29,0x12,0xd1,0x70,0x49,
0x00,0x01,0x0a,0x78,0x1c,0x21,0x4a,0x43,0x6e,0x49,0x51,0x18,0x89,0x08,0x89,0x00,
0x09,0x18,0x6a,0x48,0x08,0x18,0x01,0x88,0xc9,0x0b,0x03,0xd1,0x41,0x88,0xb1,0x43,
0x31,0x43,0x41,0x80,0x09,0xb0,0xf0,0xbd,0x01,0x20,0xd6,0xe7,0x01,0x98,0x00,0x28,
0xf8,0xd0,0x20,0x88,0x00,0x28,0x08,0xd1,0x28,0x68,0x00,0x28,0x05,0xd0,0x05,0x46,
0x38,0x63,0xc0,0x88,0x80,0x05,0x80,0x0d,0x20,0x80,0xe8,0x88,0xa9,0x88,0x82,0x05,
0x92,0x0d,0x26,0x88,0x89,0x18,0x89,0x1b,0x89,0xb2,0x06,0x91,0x81,0x04,0x89,0x0f,
0x01,0x29,0x00,0xd0,0x02,0x21,0x03,0x91,0xa1,0x7a,0x8e,0x42,0x00,0xd3,0x0e,0x46,
0x03,0x21,0x09,0x03,0x88,0x43,0x01,0x21,0x09,0x03,0x40,0x18,0xe8,0x80,0x20,0x88,
0x80,0x1b,0x20,0x80,0x20,0x7b,0xc1,0x00,0x0a,0x1a,0x01,0x92,0xe0,0x7b,0x11,0x18,
0xc9,0xb2,0x07,0x91,0x02,0x21,0x40,0x1c,0xfe,0xf7,0xe6,0xff,0x01,0x9a,0x88,0x18,
0xc0,0xb2,0x84,0x46,0x60,0x88,0xc1,0x06,0x09,0xd5,0x00,0x2d,0x07,0xd0,0x21,0x88,
0x00,0x29,0x02,0xd1,0x29,0x68,0x00,0x29,0x01,0xd0,0x01,0x21,0x00,0xe0,0x00,0x21,
0x01,0x91,0x41,0x06,0x01,0xd5,0x36,0x1d,0xb6,0xb2,0x05,0x99,0x00,0x29,0x06,0xd1,
0x01,0x99,0x00,0x29,0x01,0xd1,0xc0,0x07,0x01,0xd0,0x01,0x20,0x00,0xe0,0x00,0x20,
0x07,0x9b,0x32,0x02,0x9e,0x46,0x02,0x9b,0x00,0x01,0x5b,0x01,0x1a,0x43,0x02,0x43,
0x03,0x99,0x33,0x4e,0x0a,0x43,0x30,0x78,0x1c,0x21,0x48,0x43,0x31,0x49,0x73,0x46,
0x40,0x18,0x81,0x08,0x89,0x00,0x18,0x01,0x0b,0x18,0x2c,0x49,0x5b,0x18,0x5a,0x80,
0x33,0x78,0x1c,0x26,0x73,0x43,0x2b,0x4e,0x06,0x9a,0x9b,0x19,0x9b,0x08,0x9b,0x00,
0x1b,0x18,0x5b,0x18,0x9a,0x80,0x05,0x9a,0x00,0x2a,0x13,0xd1,0x24,0x4b,0x62,0x46,
0x1e,0x78,0x1c,0x23,0x5e,0x43,0x23,0x4b,0x12,0x01,0xf3,0x18,0x9b,0x08,0x9b,0x00,
0x9a,0x18,0x52,0x18,0x13,0x88,0xdb,0x0b,0x04,0xd1,0x56,0x88,0x10,0x23,0x9e,0x43,
0x1e,0x43,0x56,0x80,0x02,0x9a,0x00,0x2a,0x0e,0xd0,0xa3,0x7d,0x62,0x7d,0x9b,0x01,
0x13,0x43,0x17,0x4a,0x1c,0x26,0x12,0x78,0x72,0x43,0x16,0x4e,0x92,0x19,0x92,0x08,
0x92,0x00,0x12,0x18,0x52,0x18,0xd3,0x81,0x11,0x4a,0x13,0x78,0x1c,0x22,0x53,0x43,
0x10,0x4a,0x9a,0x18,0x92,0x08,0x92,0x00,0x10,0x18,0x40,0x18,0x01,0x88,0x49,0x04,
0x49,0x0c,0x01,0x80,0xe0,0x7b,0x02,0x21,0x40,0x1c,0xfe,0xf7,0x65,0xff,0xe1,0x73,
0x20,0x7c,0x40,0x1c,0x20,0x74,0x04,0x98,0x40,0x1c,0xc0,0xb2,0x04,0x90,0x02,0x28,
0x00,0xd2,0x02,0xe7,0x09,0xb0,0xf0,0xbd,0x10,0x04,0x00,0x20,0x00,0xc0,0x02,0x40,
0x03,0x01,0x00,0x20,0x8b,0x05,0x00,0x00,0xf8,0xb5,0x06,0x46,0x27,0x49,0x80,0x00,
0x0c,0x58,0x35,0x02,0x20,0x46,0x40,0x30,0x00,0x90,0x80,0x79,0x01,0x28,0x04,0xd0,
0x02,0x28,0x12,0xd0,0x03,0x28,0x3d,0xd1,0x13,0xe0,0x21,0x20,0x69,0x1c,0xff,0x22,
0x00,0x01,0xfe,0xf7,0x8b,0xff,0x62,0x6e,0x80,0x34,0xa1,0x7c,0x30,0x46,0xfe,0xf7,
0xcd,0xff,0x30,0x46,0xff,0xf7,0xf6,0xf8,0x2c,0xe0,0x69,0x1c,0xff,0x22,0x18,0x48,
0x26,0xe0,0x20,0x46,0x20,0x30,0x22,0x46,0x41,0x7d,0x80,0x32,0x51,0x74,0x07,0x7d,
0xa9,0x23,0x1b,0x01,0x97,0x74,0x02,0x2f,0x01,0xd0,0x03,0x2f,0x04,0xd1,0xd0,0x88,
0x98,0x42,0x00,0xd8,0x18,0x46,0xd0,0x80,0x02,0x29,0x01,0xd0,0x03,0x29,0x04,0xd1,
0x10,0x89,0x98,0x42,0x00,0xd8,0x18,0x46,0x10,0x81,0x39,0x46,0x30,0x46,0x62,0x6e,
0xfe,0xf7,0xa4,0xff,0x30,0x46,0xff,0xf7,0xcd,0xf8,0x69,0x1c,0xff,0x22,0x05,0x48,
0xfe,0xf7,0x54,0xff,0x00,0x98,0x00,0x21,0x81,0x71,0xf8,0xbd,0x10,0x04,0x00,0x20,
0x11,0x02,0x00,0x00,0x12,0x02,0x00,0x00,0xf3,0xb5,0x83,0xb0,0x0c,0x20,0xef,0xf3,
0x10,0x86,0x01,0x22,0x82,0xf3,0x10,0x88,0x03,0x9a,0x97,0x00,0x22,0x4a,0xd4,0x59,
0x00,0x2c,0x3c,0xd0,0x25,0x46,0x80,0x35,0x68,0x88,0x10,0x22,0x90,0x43,0x0a,0x01,
0x10,0x43,0x68,0x80,0x00,0x29,0x31,0xd0,0x03,0x98,0xff,0xf7,0x51,0xfe,0x28,0x7c,
0x00,0x28,0x2b,0xd0,0x68,0x7b,0x00,0x28,0x28,0xd1,0xa8,0x78,0xc0,0x07,0x25,0xd0,
0x28,0x7d,0x00,0x28,0x22,0xd0,0x14,0x48,0xc0,0x59,0x01,0x90,0xfe,0xf7,0xf4,0xfe,
0x00,0x90,0xa7,0x6c,0x65,0x6e,0x38,0x1a,0x00,0x01,0x00,0x09,0x85,0x42,0x15,0xd2,
0x29,0x46,0xfe,0xf7,0xc1,0xfe,0x80,0xb2,0x45,0x43,0x79,0x1b,0x09,0x01,0x09,0x09,
0xa1,0x64,0x40,0x34,0x61,0x8f,0x08,0x1a,0x60,0x87,0x00,0x21,0x01,0x98,0xfe,0xf7,
0x0b,0xff,0x01,0x22,0x00,0x99,0x03,0x98,0xff,0xf7,0x44,0xfc,0x00,0x20,0x86,0xf3,
0x10,0x88,0x05,0xb0,0xf0,0xbd,0x00,0x00,0x10,0x04,0x00,0x20,0xf8,0xb5,0x06,0x46,
0x0c,0x20,0xef,0xf3,0x10,0x87,0x01,0x24,0x84,0xf3,0x10,0x88,0x16,0x4c,0xb5,0x00,
0x64,0x59,0x00,0x2c,0x25,0xd0,0x25,0x46,0x80,0x34,0xa2,0x80,0xe1,0x80,0x13,0x4a,
0x1b,0x20,0x71,0x00,0x50,0x52,0x23,0x81,0xa1,0x7c,0xa9,0x22,0x12,0x01,0x02,0x29,
0x01,0xd0,0x03,0x29,0x04,0xd1,0xe0,0x88,0x90,0x42,0x00,0xd8,0x10,0x46,0xe0,0x80,
0x60,0x7c,0x02,0x28,0x01,0xd0,0x03,0x28,0x03,0xd1,0x93,0x42,0x00,0xd8,0x13,0x46,
0x23,0x81,0x30,0x46,0x6a,0x6e,0xfe,0xf7,0x11,0xff,0x30,0x46,0xff,0xf7,0x3a,0xf8,
0x00,0x20,0x87,0xf3,0x10,0x88,0xf8,0xbd,0x10,0x04,0x00,0x20,0xf8,0x0c,0x00,0x20,
0xf3,0xb5,0x83,0xb0,0x0c,0x20,0xef,0xf3,0x10,0x86,0x01,0x22,0x82,0xf3,0x10,0x88,
0x03,0x9a,0x97,0x00,0x21,0x4a,0xd4,0x59,0x00,0x2c,0x3b,0xd0,0x25,0x46,0x80,0x35,
0x61,0x62,0x68,0x88,0x08,0x21,0x08,0x43,0x68,0x80,0x69,0x7b,0x00,0x29,0x01,0xd0,
0xc0,0x06,0x2e,0xd5,0x03,0x98,0xff,0xf7,0xc3,0xfd,0x68,0x7b,0x00,0x28,0x28,0xd1,
0xa8,0x78,0xc0,0x07,0x25,0xd0,0x28,0x7d,0x00,0x28,0x22,0xd0,0x13,0x48,0xc0,0x59,
0x01,0x90,0xfe,0xf7,0x69,0xfe,0x00,0x90,0xa7,0x6c,0x65,0x6e,0x38,0x1a,0x00,0x01,
0x00,0x09,0x85,0x42,0x15,0xd2,0x29,0x46,0xfe,0xf7,0x36,0xfe,0x80,0xb2,0x45,0x43,
0x79,0x1b,0x09,0x01,0x09,0x09,0xa1,0x64,0x40,0x34,0x61,0x8f,0x08,0x1a,0x60,0x87,
0x00,0x21,0x01,0x98,0xfe,0xf7,0x80,0xfe,0x01,0x22,0x00,0x99,0x03,0x98,0xff,0xf7,
0xb9,0xfb,0x00,0x20,0x86,0xf3,0x10,0x88,0x05,0xb0,0xf0,0xbd,0x10,0x04,0x00,0x20,
0xf3,0xb5,0x87,0xb0,0x07,0x98,0xe5,0x4e,0x87,0x00,0xf0,0x59,0x0c,0x24,0x0d,0x46,
0x00,0x28,0x7c,0xd1,0x00,0x21,0x98,0x20,0xfe,0xf7,0xa2,0xfe,0xf0,0x51,0x00,0x28,
0x75,0xd0,0x06,0x46,0x00,0x20,0x00,0x90,0xfe,0xf7,0x2e,0xfe,0x05,0x90,0x07,0x98,
0x02,0x90,0x98,0x21,0x30,0x46,0xfe,0xf7,0x1c,0xfe,0xd9,0x49,0x08,0x68,0x00,0x28,
0x01,0xd1,0xd8,0x48,0x08,0x60,0xd8,0x48,0x02,0x68,0x00,0x2a,0x01,0xd1,0xd7,0x4a,
0x02,0x60,0x0a,0x68,0x32,0x62,0x01,0x68,0x00,0x27,0xf7,0x61,0xd4,0x48,0xb7,0x60,
0xb1,0x61,0x81,0x7a,0xb1,0x75,0x01,0x21,0x49,0x03,0xb1,0x82,0x34,0x46,0x80,0x34,
0x07,0x98,0x20,0x73,0x60,0x88,0xcf,0x4a,0x43,0x08,0x28,0x46,0x20,0x30,0x03,0x90,
0x00,0x79,0x5b,0x00,0x03,0x43,0xc8,0x10,0x83,0x43,0x30,0x46,0x63,0x80,0x40,0x30,
0x01,0x90,0x07,0x87,0x47,0x87,0xc7,0x87,0xe9,0x79,0x89,0x00,0x01,0x86,0x29,0x89,
0x89,0x00,0x31,0x66,0x69,0x89,0x89,0x00,0x71,0x66,0xa9,0x89,0x41,0x86,0xe9,0x89,
0x49,0x01,0xb1,0x66,0x69,0x7d,0xe1,0x72,0xa9,0x7d,0x49,0x00,0x51,0x5a,0xc1,0x86,
0x10,0x20,0x03,0x43,0x63,0x80,0x27,0x74,0xa7,0x73,0xe7,0x73,0x77,0x62,0x37,0x63,
0x27,0x80,0x1b,0x21,0xa1,0x80,0x03,0x98,0x40,0x79,0x02,0x28,0x45,0xd0,0x03,0x28,
0x43,0xd0,0xff,0x20,0x49,0x30,0xe0,0x80,0x07,0x98,0xb3,0x4a,0x40,0x00,0x11,0x52,
0xe0,0x88,0x20,0x81,0xa1,0x72,0x03,0x98,0x40,0x79,0x60,0x74,0x03,0x98,0x40,0x79,
0xa0,0x74,0xe7,0x74,0xa0,0x78,0xc0,0x07,0x04,0xd0,0x20,0x7b,0x00,0xe0,0x41,0xe1,
0xfe,0xf7,0x14,0xfe,0x03,0x98,0x02,0x9b,0x00,0x79,0x00,0x28,0x28,0xd0,0x03,0x20,
0x70,0x21,0x4b,0x43,0xa5,0x49,0x5f,0x18,0x04,0x97,0x38,0x82,0x03,0x98,0x11,0x21,
0x40,0x79,0x09,0x02,0x82,0x00,0x11,0x43,0x01,0x43,0xf9,0x82,0x02,0x98,0x20,0x21,
0x00,0x02,0x08,0x43,0x78,0x82,0x28,0x88,0xf8,0x83,0x68,0x88,0x38,0x84,0xa8,0x88,
0x78,0x84,0xa8,0x79,0xb9,0x8c,0x09,0x0a,0x09,0x02,0x01,0x43,0xb9,0x84,0x03,0x98,
0x80,0x79,0x00,0x28,0x06,0xd0,0x01,0x22,0x05,0xe0,0xa9,0x20,0x00,0x01,0xba,0xe7,
0x02,0x20,0xd5,0xe7,0x00,0x22,0xe0,0x7a,0x01,0x21,0xc9,0x03,0x52,0x03,0xc0,0x06,
0x11,0x43,0xc0,0x0c,0x01,0x43,0x39,0x85,0x8d,0x48,0x00,0x21,0x18,0x18,0x02,0x90,
0x01,0x87,0x61,0x88,0x01,0x20,0x40,0x02,0x81,0x43,0x03,0x98,0x80,0x79,0x00,0x28,
0x7e,0xd0,0x00,0x20,0x40,0x02,0x01,0x43,0x86,0x48,0x61,0x80,0x40,0x7b,0x78,0x85,
0x07,0x98,0xfe,0xf7,0x07,0xff,0x02,0x99,0xfb,0x20,0x08,0x81,0x02,0x99,0x00,0x20,
0x48,0x81,0x61,0x7c,0x80,0x48,0x40,0x5c,0x03,0x28,0x6a,0xd0,0x0e,0x20,0x41,0x08,
0x00,0x20,0xf9,0x85,0x69,0x7c,0x2a,0x7c,0x09,0x02,0x11,0x43,0x02,0x9a,0x51,0x80,
0xe9,0x7c,0xaa,0x7c,0x09,0x02,0x11,0x43,0x02,0x9a,0x91,0x80,0x69,0x7d,0x2a,0x7d,
0x09,0x02,0x11,0x43,0x02,0x9a,0xd1,0x80,0x78,0x87,0xf9,0x8e,0xc9,0x09,0xc9,0x01,
0xf9,0x86,0x38,0x87,0x01,0x21,0xb9,0x85,0x02,0x99,0x48,0x86,0x02,0x99,0x88,0x86,
0x02,0x99,0xc8,0x86,0x00,0x27,0x20,0x7b,0xc1,0x00,0x08,0x1a,0x02,0x90,0xc0,0x19,
0xc2,0xb2,0x78,0x1c,0x02,0x21,0x06,0x92,0xfe,0xf7,0x06,0xfd,0x02,0x98,0x1c,0x23,
0x08,0x18,0x66,0x49,0x00,0x06,0x09,0x78,0x00,0x0d,0x59,0x43,0x64,0x4b,0x06,0x9a,
0xc9,0x18,0x89,0x08,0x89,0x00,0x08,0x18,0x83,0x08,0x01,0x20,0xc0,0x03,0x18,0x43,
0x13,0x01,0xca,0x18,0x5f,0x49,0x51,0x18,0x08,0x80,0x5c,0x49,0x1c,0x22,0x09,0x78,
0x00,0x20,0x51,0x43,0x5a,0x4a,0x89,0x18,0x89,0x08,0x89,0x00,0xca,0x18,0x59,0x49,
0x51,0x18,0x48,0x80,0x55,0x49,0x1c,0x22,0x09,0x78,0x51,0x43,0x54,0x4a,0x89,0x18,
0x89,0x08,0x89,0x00,0xca,0x18,0x53,0x49,0x51,0x18,0x88,0x80,0x7f,0x1c,0x02,0x2f,
0xc1,0xdb,0x4e,0x48,0x1c,0x21,0x00,0x78,0x48,0x43,0x4d,0x49,0x40,0x18,0x01,0xe0,
0x32,0xe0,0x33,0xe0,0x81,0x08,0x20,0x7b,0x70,0x22,0x89,0x00,0x50,0x43,0x08,0x18,
0x04,0x99,0x80,0x08,0x88,0x86,0x61,0x88,0xc8,0x07,0x29,0xd0,0x03,0x9a,0x46,0x4b,
0x52,0x79,0xe8,0x69,0x52,0x00,0x9a,0x5a,0x2b,0x8b,0x52,0x00,0x9a,0x18,0x92,0xb2,
0x42,0x4d,0x07,0x46,0x00,0x92,0xaa,0x42,0x08,0xd3,0x6b,0x42,0xd2,0x18,0x40,0x1c,
0x92,0xb2,0x00,0x01,0x00,0x09,0x00,0x92,0xaa,0x42,0xf7,0xd2,0x37,0x65,0x01,0x9b,
0x00,0x9a,0xda,0x85,0x03,0x9a,0xd2,0x79,0x00,0x2a,0x10,0xd0,0x03,0x9a,0x52,0x79,
0x02,0x2a,0x0e,0xd2,0x08,0x22,0x0d,0xe0,0x01,0x20,0x4b,0xe7,0x70,0x20,0x5e,0xe7,
0x2a,0x6a,0x32,0x65,0x01,0x9a,0x00,0x20,0xd0,0x85,0x28,0x6a,0x0b,0xe0,0x04,0x22,
0x00,0xe0,0x0c,0x22,0x80,0x18,0x01,0x9a,0x33,0x6e,0x12,0x8e,0x18,0x18,0x52,0x08,
0x10,0x18,0x00,0x01,0x00,0x09,0x32,0x6d,0x72,0x65,0xb2,0x65,0xb0,0x64,0xc8,0x07,
0x00,0xd0,0x00,0x98,0x02,0xb2,0x01,0x98,0x82,0x85,0xc8,0x07,0x04,0xd0,0x01,0x98,
0x22,0x4b,0x00,0x8e,0x58,0x43,0x06,0xe0,0x63,0x7c,0x1b,0x48,0xc0,0x5c,0x03,0x28,
0x05,0xd0,0x0e,0x20,0x40,0x00,0xf0,0x64,0xc8,0x07,0x03,0xd1,0x01,0xe0,0x70,0x20,
0xf8,0xe7,0x00,0x22,0xb2,0x60,0x01,0x22,0x05,0x99,0x07,0x98,0xff,0xf7,0xf2,0xf9,
0x00,0x20,0x00,0x90,0x30,0x8a,0x21,0x7b,0x83,0xb2,0x04,0x20,0x72,0x6e,0xfe,0xf7,
0x8d,0xfc,0x00,0x24,0x20,0x46,0x09,0xb0,0xf0,0xbd,0x00,0x00,0x10,0x04,0x00,0x20,
0x04,0x0d,0x00,0x20,0xa1,0x81,0x00,0x20,0x08,0x0d,0x00,0x20,0xe1,0x81,0x00,0x20,
0x91,0xd7,0x02,0x00,0x50,0xd7,0x02,0x00,0xf8,0x0c,0x00,0x20,0x40,0xc1,0x02,0x40,
0x80,0xc1,0x02,0x40,0x94,0x02,0x00,0x20,0x76,0xd7,0x02,0x00,0x03,0x01,0x00,0x20,
0x8b,0x05,0x00,0x00,0x00,0xc0,0x02,0x40,0xd0,0xe4,0x02,0x00,0x71,0x02,0x00,0x00,
};
#endif //(_PATCH_LLD_COM_)

#if (_PATCH_KE_MSG_SET_)
static __align(64) unsigned char  patch_5_Array[] =
{ 
    0x33,0x1a,0x2a,0x46,0x9a,0x40,0x0a,0x42,0x02,0xd1,0x40,0x1c,0x20,0x28,0xf7,0xd3,
    0x30,0x1a,0x00,0x06,0x80,0x0d,0x00,0x19,0x40,0x68,0x00,0x28,0x00,0xd0,0x80,0x47,
    0x21,0x68,0x00,0x29,0xeb,0xd1,0x70,0xbd,0xf8,0x01,0x00,0x20,0x00,0x49,0x08,0x47,
    0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};

static __align(4) unsigned char  fun_5_Array[]  ={
0x10,0xb4,0xef,0xf3,0x10,0x81,0x01,0x22,0x82,0xf3,0x10,0x88,0x13,0x46,0x0a,0x28,
0x04,0xd2,0x06,0x4a,0x83,0x40,0x14,0x68,0x1c,0x43,0x14,0x60,0x01,0x20,0x04,0x4a,
0xc0,0x03,0x10,0x60,0x81,0xf3,0x10,0x88,0x10,0xbc,0x70,0x47,0xf8,0x01,0x00,0x20,
0x00,0xe2,0x00,0xe0,0x40,0xba,0x70,0x47,0xc0,0xba,0x70,0x47,
};
#endif

/* Public function prototypes -----------------------------------------------*/

static __inline void patchx_enable(uint32_t patch_num, uint32_t dst_addr, uint32_t src_addr)  
{
    if(patch_num >= 16)
        return;   
    PATCH->PATCHDATAx[patch_num].RomAddrx = dst_addr >> 6;
    PATCH->PATCHDATAx[patch_num].PatchAddrx = src_addr >> 6;
    PATCH->PATCHEN |= 1<< patch_num;
} 


#define  np_lld_con_frm_cbk_addr            0x20000D00
#define  np_lld_con_evt_canceled_cbk_addr   0x20000D04
#define  np_lld_con_evt_start_cbk_addr      0x20000D08

extern void RCC_EnableAHBPeriphClk(uint32_t RCC_AHBPeriph, FunctionalState Cmd);
static __inline void NS_BLE_PATCH_INIT(void)
{
    RCC_EnableAHBPeriphClk(RCC_AHB_PERIPH_PATCH, ENABLE); 
    
    #if (_PATCH_LLD_COM_)
    REG32(np_lld_con_frm_cbk_addr)              = (uint32_t)lld_con_Array + np_lld_con_frm_cbk;
    REG32(np_lld_con_evt_canceled_cbk_addr)     = (uint32_t)lld_con_Array + np_lld_con_evt_canceled_cbk;
    REG32(np_lld_con_evt_start_cbk_addr)        = (uint32_t)lld_con_Array + np_lld_con_evt_start_cbk;
    
    //patch 0
    REG32(patch_0_Array+PATCH_RAM_ADDR_OFFSET_0) = (uint32_t)lld_con_Array+PATCH_0_FUNC_OFFSET;
    patchx_enable(0, PATCH_ROM_ADDR_0, (uint32_t)patch_0_Array);
    
    //patch 1
    REG32(patch_1_Array+PATCH_RAM_ADDR_OFFSET_1) = (uint32_t)lld_con_Array+PATCH_1_FUNC_OFFSET;
    patchx_enable(1, PATCH_ROM_ADDR_1, (uint32_t)patch_1_Array);
          
    //patch 2  
    REG32(patch_2_Array+PATCH_RAM_ADDR_OFFSET_2) = (uint32_t)lld_con_Array+PATCH_2_FUNC_OFFSET;
    patchx_enable(2, PATCH_ROM_ADDR_2, (uint32_t)patch_2_Array);  
    
    //patch 3  
    REG32(patch_3_Array+PATCH_RAM_ADDR_OFFSET_3) =  (uint32_t)lld_con_Array+PATCH_3_FUNC_OFFSET;
    patchx_enable(3, PATCH_ROM_ADDR_3, (uint32_t)patch_3_Array);
    #endif //(_PATCH_LATENCY_)
	
    #if (_PATCH_KE_MSG_SET_)
    REG32(patch_5_Array+PATCH_RAM_ADDR_OFFSET_5) = (uint32_t)fun_5_Array+1; 
    patchx_enable(5, PATCH_ROM_ADDR_5, (uint32_t)patch_5_Array);
    #endif
    
}


static __inline void NS_BLE_STACK_INIT()
{
    PWR->VTOR_REG           = 0;                      
    g_modem_flag            = MODEM_CHIP;              
    g_app_init_branch       = false;                   
    g_clock_src             = HSI_CLK;                 
    g_system_hsi_clk        = HSI_VALUE;               
    g_cal_hsi_cnt_value     = HSI_64M_VAL;             
    g_delay_div_param       = 79;                     
    g_delay_us_div_param    = 8;                      
    llm_local_le_feats.feats[0] = 0xff;                
    llm_local_le_feats.feats[1] = 0xff;                
    llm_local_le_feats.feats[2] = 0xff;                
    llm_local_le_feats.feats[3] = 0x07;                
    llm_local_le_feats.feats[4] = 0x00;                
    llm_local_le_feats.feats[5] = 0x00;                
    llm_local_le_feats.feats[6] = 0x00;                
    llm_local_le_feats.feats[7] = 0x00;                
    REG32(0x200000dc) =(uint32_t) prf_add_profile;     
    REG32(0x200000e0) =(uint32_t) prf_get_task_from_id;
    REG32(0x200000e4) =(uint32_t) prf_get_id_from_task;
    rwip_init(RESET_NO_ERROR);

}


#ifdef __cplusplus
}
#endif

#endif /* __BLE_STACK_COMMON_H_*/


